import java.util.Scanner;

public class demo5 {
    public static void main(String[] args) {
add();
    }
    public static void add(){
        Scanner scanner=new Scanner(System.in);
        double[] arr=new double[6];
        double scores=0;
        for (int i = 0; i < arr.length; i++) {
            System.out.println("第"+(i+1)+"位评委的评分为:");
            arr[i]= scanner.nextInt();
            scores+=arr[i];
        }
        double Max=arr[0];
        double min=arr[0];
        for (int i = 0; i < arr.length; i++) {
            if (Max<arr[i]) {
                Max=arr[i];
            }
            if (min>arr[i]) {
                min=arr[i];
            }
        }
        System.out.println("最大值为:"+Max);
        System.out.println("最小值为:"+min);
        double a=(scores-Max-min)/4;
        System.out.println("最终得分为:"+a);
    }
}
